<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <input id="c-anchang_id" type="hidden" name="row[anchang_id]" value="{$anchang_id}">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('所屬案場')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input readonly class="form-control" type="text" value="{$anchangname}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remind_type')}:</label>
        <div class="col-xs-12 col-sm-3">
                        
            <select  id="c-remind_type" data-rule="required" class="form-control selectpicker" name="row[remind_type]">
                {foreach name="remindTypeList" item="vo"}
                    <option value="{$key}" {in name="key" value="一般件單日提醒"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
        <div class="col-xs-12 col-sm-5" style="padding-top: 8px">
            急件:3天內  一般件: 指定日期之前7天後3天
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remind_date')}:</label>
        <div class="col-xs-6 col-sm-4">
            <input id="c-remind_date" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[remind_date]" type="text" value="{:date('Y-m-d')}">
        </div>
        <label id="c-weekinfo" style="padding: 5px"></label>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Apptx_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-apptx_time" class="form-control datetimepicker" data-date-format="HH:mm:ss" data-use-current="true" name="row[apptx_time]" type="text" value="07:00:00">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Jgtx')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  id="c-jgtx" name="row[jgtx]" type="hidden" value="0">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-jgtx" data-yes="1" data-no="0" >
                <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
            </a>
        </div>

    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Replay')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-replay" data-rule="required" class="form-control" name="row[replay]" type="number" value="0">
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Task_status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="taskStatusList" item="vo"}
                <label for="row[task_status]-{$key}"><input id="row[task_status]-{$key}" name="row[task_status]" type="radio" value="{$key}" {in name="key" value="一般作業"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50">{:date('Y-m-d')}&nbsp; {$maintenanceuser} &nbsp;&nbsp;</textarea>
        </div>
    </div>

    <input id="c-maintenanceuser_id" type="hidden" name="row[maintenanceuser_id]" value="{$maintenanceuser_id}">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Handleuser_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-handleuser_id" data-rule="" class="form-control selectpicker" name="row[handleuser_id]">
                {foreach name="handleuserList" item="vo"}
                <option value="{$vo['id']}" {in name="$vo['id']" value="$handleuser_id"}selected{/in}>{$vo['name']}</option>
                {/foreach}
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Notifyuser_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-notifyuser_ids" data-rule="required" data-source="jdy/task/notifyuser"  data-multiple="true"  class="form-control selectpage" name="row[notifyuser_ids]" type="text" value="">
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Share_to_comm')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="shareToCommList" item="vo"}
                <label for="row[share_to_comm]-{$key}"><input id="row[share_to_comm]-{$key}" name="row[share_to_comm]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Quotation_no')}:</label>
        <div class="col-xs-12 col-sm-5">
            <input id="c-quotation_no" class="form-control" name="row[quotation_no]" type="text" value="">
        </div>

        <div class="col-xs-12 col-sm-3" style="padding-top: 8px">
            多個用;分隔
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Work_no')}:</label>
        <div class="col-xs-12 col-sm-5">
            <input id="c-work_no" class="form-control" name="row[work_no]" type="text" value="NO-">
        </div>
        <div class="col-xs-12 col-sm-3" style="padding-top: 8px">
            多個用;分隔
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" data-rule="required" class="form-control" name="row[price]" type="text" value="0">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <a href="/admin/jdy/acdevice/add/ids/{$anchang_id}" class="btn btn-success btn-dialog" title="添加案場設備" ><i class="fa fa-plus"></i> {:__('添加案場設備')}</a>

        <a href="/admin/jdy/smallcategory/add" class="btn btn-success btn-dialog" title="添加設備类别" ><i class="fa fa-plus"></i> {:__('添加設備类别')}</a>

    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Acdevice_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-acdevice_ids" data-rule="" data-source="jdy/acdevice/index" data-multiple="true"  data-params='{$acdeviceparams}' class="form-control selectpage" name="row[acdevice_ids]" type="text" value="">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Baogu')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-baogu" data-rule="required" class="form-control" name="row[baogu]" type="number" min="1" value="1">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('保固日期')}:</label>
        <div class="col-xs-2 col-sm-2">
            <input id="c-baogu_start" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[baogu_start]" type="text" value="{:date('Y-m-d')}">
        </div>
        <label class="col-xs-1 col-sm-1" style="padding: 1px;font-size: 20px;text-align: center">~</label>
        <div class="col-xs-2 col-sm2">
            <input id="c-baogu_end" class="form-control " readonly name="row[baogu_end]" type="text" value="{:date('Y-m-d')}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" class="form-control" size="500" name="row[images]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-images" class="btn btn-danger plupload" data-input-id="c-images" data-mimetype="*" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-images"></ul>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Maintenanceuser_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input readonly class="form-control" type="text" value="{$maintenanceuser}">
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Zqxgz')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  id="c-zqxgz" name="row[zqxgz]" type="hidden" value="0">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-jgtx" data-yes="1" data-no="0" >
                <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
            </a>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('cfzq')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="cfzqList" item="vo"}
                <label for="row[cfzq]-{$key}"><input id="row[cfzq]-{$key}" name="row[cfzq]" type="radio" value="{$key}" {in name="key" value="月"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cfzq_num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-cfzq_num" data-rule="required" class="form-control" name="row[cfzq_num]" type="number" value="1"  min="0" max="30">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Month_gl')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-month_gl" data-rule="required" class="form-control" name="row[month_gl]" type="number" value="1" min="1" max="31">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Year_gl')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-year_gl" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[year_gl]" type="text" value="{:date('Y-m-d')}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cfgzfw')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="cfgzfwList" item="vo"}
                <label for="row[cfgzfw]-{$key}"><input id="row[cfgzfw]-{$key}" name="row[cfgzfw]" type="radio" value="{$key}" {in name="key" value="永不"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cf_num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-cf_num" data-rule="required" class="form-control" name="row[cf_num]" type="number" value="1" min="1" max="60">
        </div>
    </div>


    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <!--<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>-->
        </div>
    </div>
</form>
